package com.sayice.robotconflict.game.msg.data.send;

import cn.hutool.core.bean.BeanUtil;
import com.sayice.robotconflict.game.object.Player;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * 对局玩家信息
 *
 * @author shubing
 */
@Getter
@Setter
@ToString
public class GamePlayerInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    
    /**
     * ID
     */
    private String id;
    
    /**
     * 玩家名
     */
    private String name;
    
    /**
     * 对局次数
     */
    private int gameNum;
    
    /**
     * 胜率 (%)
     */
    private int winRate;
    
    public GamePlayerInfo() {
    }
    
    public GamePlayerInfo(Player player) {
        BeanUtil.copyProperties(player, this);
    }
}
